package com.fcfactory.eggutils.manageOtherBean;

import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @autuor 范大晨
 * @Date 2023/9/19 17:26
 */
@Component
public class MybatisPlusBeanInject {

    /**
     * @return 代码生成器
     */
    @Bean
    public AutoGenerator autoGenerator(){
        return new AutoGenerator();
    }

    /**
     * @return 全局配置
     */
    @Bean
    public GlobalConfig globalConfig(){
        return new GlobalConfig();
    }

    /**
     * @return 数据源配置
     */
    @Bean
    public DataSourceConfig dataSourceConfig(){
        return new DataSourceConfig().setUrl("");
    }

    /**
     * @return 包配置
     */
    @Bean
    public PackageConfig packageConfig(){
        return new PackageConfig();
    }

    /**
     * @return 策略配置
     */
    @Bean
    public StrategyConfig strategyConfig(){
        return new StrategyConfig();
    }
}
